
#include <Windows.h>
#include <string>
using namespace std;

class CTCPNetClient
{
public:
	~CTCPNetClient();
	CTCPNetClient();
	DWORD GetHandle();
	int WriteData(unsigned char * pBuff, int count);
	int ReadData(unsigned char * pBuff, int count);
	void Clear(BYTE type);
	bool Close();
	bool Open(int port, string m_ipaddr);
private:
	int m_err_count;
	SOCKET				m_sck;
	sockaddr_in			m_netaddr;
	int					m_port;
	string				m_ipaddr;
};

